import DelButton from '../../../components/delbutton';
import { IData } from '../../api/xskq/xquery.api';
import Table from '../../../components/table';
import IconButton from '../../../components/iconbutton';



export default function Xlist({ data }: {
	data: IData[];
}) {
	return <>
		<Table
			idfieldname='date'
			data={data}
		>

			<Table.Column<IData> title='年级' key='grade' dataIndex='grade' align='left' />
			<Table.Column<IData> title='班级' key='classname' dataIndex='classname' align='left' />
			<Table.Column<IData> title='课程名称' key='coursename' dataIndex='coursename' align='left' />
			<Table.Column<IData> title='学号' key='student_id' dataIndex='student_id' align='left' />
			<Table.Column<IData> title='学生姓名' key='studentname' dataIndex='studentname' align='left' />
			<Table.Column<IData> title='教师姓名' key='teachername' dataIndex='teachername' align='left' />
			<Table.Column<IData> title='日期' key='date' dataIndex='date' align='left' render={(v) => {
				const dt = new Date(Number(v));
				return <span>{dt.toLocaleDateString()}</span>;
			}} />
			<Table.Column<IData> title='星期' key='week' dataIndex='week' align='left' />
			<Table.Column<IData> title='签到状态' key='attendancestatus' dataIndex='attendancestatus' align='left' />
		</Table>
	</>;
}
